<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Pastes</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Pastes</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Main model class for pastes table/stikked.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Ben McRedmond &lt;<a href="mailto:hello@benmcredmond.com">hello@benmcredmond.com</a>&gt;</li>
				<li><span class="field">version:</span> 0.5.1</li>
				<li><span class="field">copyright:</span> Ben McRedmond</li>
				<li><span class="field">access:</span> public</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_models---Pastes.php.html">/models/Pastes.php</a> (line <span class="field">24</span>)
		</p>
		
				
		<pre>Model
   |
   --Pastes</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																								<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">Pastes</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#checkPaste" title="details" class="method-name">checkPaste</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>])
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#countPastes" title="details" class="method-name">countPastes</a>
										()
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#createPaste" title="details" class="method-name">createPaste</a>
										()
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#cron" title="details" class="method-name">cron</a>
										()
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#getLists" title="details" class="method-name">getLists</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$root</span> = <span class="var-default">'lists/'</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>])
									</div>
																<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#getPaste" title="details" class="method-name">getPaste</a>
											([<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>], [<span class="var-type">bool|string</span>&nbsp;<span class="var-name">$replies</span> = <span class="var-default">false</span>])
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">27</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">Pastes</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcheckPaste" id="checkPaste"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">checkPaste</span> (line <span class="line-number">183</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if a paste exists</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			checkPaste
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$seg</span><span class="var-description">: URL Segment which the paste id is in</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcountPastes" id="countPastes"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">countPastes</span> (line <span class="line-number">41</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Counts pastes in the database to be used when generating pagination</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../Stikked/Models/Pastes.html#methodgetLists">Pastes::getLists()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			countPastes
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcreatePaste" id="createPaste"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">createPaste</span> (line <span class="line-number">56</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates a paste in the database. This doesn't take any arguments as it's easier to use the input class.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			createPaste
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcron" id="cron"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">cron</span> (line <span class="line-number">372</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds paste that need to be deleted and deletes them.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cron
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetLists" id="getLists"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getLists</span> (line <span class="line-number">331</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets a list of x most recent pastes according to the amount set in the stikked config file.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getLists
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$root</span> = <span class="var-default">'lists/'</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$root</span><span class="var-description">: Url root needed for pagination</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$seg</span><span class="var-description">: Segment which determines the page we're on for pagination.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetPaste" id="getPaste"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getPaste</span> (line <span class="line-number">215</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets a specific paste from the database and all its related meta-data</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getPaste
		</span>
					([<span class="var-type">int</span>&nbsp;<span class="var-name">$seg</span> = <span class="var-default">2</span>], [<span class="var-type">bool|string</span>&nbsp;<span class="var-name">$replies</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$seg</span><span class="var-description">: URL Segment which the paste id is in</span>			</li>
					<li>
				<span class="var-type">bool|string</span>
				<span class="var-name">$replies</span><span class="var-description">: False if you don't want to retrieve replies from the database. Paste ID if you do want to retrieve replies from database. Mostly here for legacy support, eg. iPhone views.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Mon, 15 Sep 2008 12:57:44 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>